package cn.lds.j367.dsbank.controller;

import cn.lds.j367.dsbank.entity.Employee;
import cn.lds.j367.dsbank.service.EmpService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class HomeController extends BaseController{

    @Autowired
    private EmpService empService;

    private static final Logger log = LoggerFactory.getLogger(HomeController.class);

    @RequestMapping("/")
    public String home(){

        Employee loginEmp = this.getLoginEmp();

        log.info("登录员工：{}",loginEmp);

        return "home";
    }
}
